<div class="panel panel-danger" ng-if="!success">
    <div class="panel-heading">
        <strong>{{(artifact.data || artifact.attachment.name) | fang}}</strong>
    </div>
    <div class="panel-body">
        {{content.errorMessage}}
    </div>
</div>


<div class="panel panel-info" ng-if="success">
    <div class="panel-heading">
        Email message details
    </div>
    <div class="panel-body">
        <div ng-show="content.traits.is_anonymous_proxy" class="alert alert-warning">Is anonymous proxy</div>
        <div ng-show="content.traits.is_satellite_provider" class="alert alert-warning">Is satellite provider</div>

        <dl class="dl-horizontal">
            <dt>From</dt>
            <dd>{{content.displayFrom}} ({{content.sender}})</dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>To</dt>
            <dd>{{content.displayTo}} ({{content.receivers}})</dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>Subject</dt>
            <dd>{{content.subject || '-'}}</dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>Topic</dt>
            <dd>{{content.topic || '-'}}</dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>Bcc</dt>
            <dd>{{content.bcc || '-'}}</dd>
        </dl>
        <dl class="dl-horizontal" ng-if="content.attachments && content.attachments.length !== 0">
            <dt>Attachments</dt>
            <dd>
                <div class="bm10">This message file includes
                    <ng-pluralize count="content.attachments.length" when="{'1': '1 attachment', 'other': '{} attachments'}"></ng-pluralize>
                </div>
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>Filename</th>
                        <th>Mime Type</th>
                        <th>Extension</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="a in content.attachments">
                        <td class="wrap">{{a.filename}}</td>
                        <td class="wrap">{{a.mime}}</td>
                        <td>{{a.extension}}</td>
                    </tr>
                    </tbody>
                </table>
            </dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>Headers</dt>
            <dd>
                <pre>{{content.headers}}</pre>
            </dd>
        </dl>
        <dl class="dl-horizontal">
            <dt>Body</dt>
            <dd>
                <pre>{{content.body}}</pre>
            </dd>
        </dl>
    </div>
</div>
